package com.api.order;

import com.last.entity.Order;
import com.last.entity.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Component
@RequestMapping("/order")
@FeignClient("homestay-order")
public interface OrderClient {

    @RequestMapping("findOrderInfo")
    public Order findOrderInfo(@RequestParam("orderId")
                                           String orderId);


    @RequestMapping("status")
    public Result status(@RequestBody Order order);


    @RequestMapping("return")
    public Result releaseStore(@RequestParam("orderId")
                                           String orderId);

}